package com.base.learning;

import java.lang.management.ManagementFactory;
import java.lang.management.ThreadInfo;
import java.lang.management.ThreadMXBean;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Hashtable;
import java.util.RandomAccess;

/**
 * @author admin
 * @description
 * @date 2022/4/19 14:07
 */
public class Application {

    private final Integer i= 1;


    public static void main(String[] args) {
        Application application = new Application();
        System.out.println(application.i);
        //application.testValue();
        StringBuffer stringBuffer = new StringBuffer();
        StringBuilder stringBuilder = new StringBuilder();
        //new String()
        RandomAccess randomAccess = new ArrayList<String>();
        HashMap<String, Integer> stringIntegerHashMap = new HashMap<>(3);
        Hashtable<String, Integer> stringIntegerHashtable = new Hashtable<>();
        ThreadMXBean threadMXBean = ManagementFactory.getThreadMXBean();
        ThreadInfo[] threadInfos = threadMXBean.dumpAllThreads(false, false);
        for (ThreadInfo threadInfo:threadInfos){
            System.out.println("[" + threadInfo.getThreadId() + "] " + threadInfo.getThreadName() );
        }


    }

    //public static void main(String[] args) {
    //    System.out.println("hello world");
    //}

}
